# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.WalletObjects.V1.Model.SetPassUpdateNoticeRequest do
  @moduledoc """
  Request to send a private pass update notice information to Google, so that devices can then fetch the notice prompting the user to update a pass.

  ## Attributes

  *   `externalPassId` (*type:* `String.t`, *default:* `nil`) - Required. A fully qualified identifier of the pass that the issuer wants to notify the pass holder(s) about. Formatted as .
  *   `updateUri` (*type:* `String.t`, *default:* `nil`) - Required. The issuer endpoint URI the pass holder needs to follow in order to receive an updated pass JWT. It can not contain any sensitive information. The endpoint needs to authenticate the user before giving the user the updated JWT. Example update URI https://someissuer.com/update/passId=someExternalPassId
  *   `updatedPassJwtSignature` (*type:* `String.t`, *default:* `nil`) - Required. The JWT signature of the updated pass that the issuer wants to notify Google about. Only devices that report a different JWT signature than this JWT signature will receive the update notification.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :externalPassId => String.t() | nil,
          :updateUri => String.t() | nil,
          :updatedPassJwtSignature => String.t() | nil
        }

  field(:externalPassId)
  field(:updateUri)
  field(:updatedPassJwtSignature)
end

defimpl Poison.Decoder, for: GoogleApi.WalletObjects.V1.Model.SetPassUpdateNoticeRequest do
  def decode(value, options) do
    GoogleApi.WalletObjects.V1.Model.SetPassUpdateNoticeRequest.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.WalletObjects.V1.Model.SetPassUpdateNoticeRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
